<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/11/19 0019
 * Time: 11:07
 */

namespace app\index\controller;


use think\Controller;

class Eat extends Controller
{
    public function index(){
        $this_title = db("title")->where("action","eat")->find();
        $title = db("title")->where("pid",0)->select();
        $this->assign("this_title",$this_title);
        $right_data = db("eat")->order("id desc")->where("type",0)->select();
        $right_data_order = db("eat")->where("type",1)->order("id desc")->select();
        $left_data = db("eat")->where("type",1)->select();
//        dump($left_data);die;
        $this->assign([
            "title"=>$title,
            "action"=>"eat",
            'left_data' => $left_data,
            'right_data' => $right_data,
            'right_data_order' => $right_data_order,
        ]);
        return view("index");
    }
}